package com.yq.ylmall.client.product.fallback;

import com.yq.ylmall.client.product.ProductFeignClient;
import com.yq.ylmall.dto.product.ProductDecreaseDto;
import com.yq.ylmall.vo.product.ProductInfoVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class ProductFeignFallback implements ProductFeignClient {

    @Override
    public ProductInfoVo getById(Long id) {
        log.warn("服务熔断：根据ID获取商品");
        return null;
    }


    @Override
    public void decreaseStock(ProductDecreaseDto productDecrease) {
        // todo 库存扣减降级实现
        log.warn("服务熔断：库存扣减 todo");
    }

    @Override
    public String indexCategory() {
        log.warn("服务熔断：获取首页分类数据");
        return null;
    }

    @Override
    public String indexBanner() {
        log.warn("服务熔断：获取Banner");
        return null;
    }

}
